package com.sjms._04_创建_原型模式;

import java.util.ArrayList;

public class Yang_浅 implements Cloneable {
    public String name;
    public int age;
    public ArrayList<String> list;

    public Yang_浅(String name, int age) {
        this.name = name;
        this.age = age;
        this.list = new ArrayList<>();
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void add() {
        this.list.add(" MMM ");

    }

}
